<template>
	<view class="layout">
		<view class="layout-main">
			<web-view :src="webViewUrl" />
		</view>
	</view>
</template>

<script>
export default {
	name: 'TandianStore',

	data() {
		return {
			webViewUrl: ''
		};
	},

	onLoad(params) {
		let { title, webView, imgUrl } = params;
		const status = webView.includes('?');

		webView += `${status ? '&' : '?'}v=${Date.now()}`;

		title && uni.setNavigationBarTitle({ title });
		imgUrl && (webView += `&imgUrl=${encodeURIComponent(imgUrl)}`);

		this.webViewUrl = webView;
	}
};
</script>

<style lang="scss" scoped></style>
